<template>
  <div>
    <slot></slot>
    <!-- <h1>我是父组件</h1> -->
    <Zi :futext="text" @shuju="newdata" />
    <span>-------------{{ text2 }}</span>
    <Caokou>
      <h1>我是组件被调用时插入的新的dome节点</h1>
    </Caokou>
  </div>
</template>

<script>
import Zi from "@/components/study/zi.vue";
import Caokou from "@/components/study/caokou.vue";
export default {
  data() {
    return {
      text: "我是父组件得内容",
      text2: "",
    };
  },
  components: {
    Zi,
    Caokou,
  },
  methods: {
    newdata(val) {
      console.log(val);
      this.text2 = val;
    },
  },
};
</script>

<style>
</style>